# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'

module Google
  module Apis
    module PubliccaV1
      
      # A representation of an ExternalAccountKey used for [external account binding](
      # https://tools.ietf.org/html/rfc8555#section-7.3.4) within ACME.
      class ExternalAccountKey
        include Google::Apis::Core::Hashable
      
        # Output only. Base64-URL-encoded HS256 key. It is generated by the
        # PublicCertificateAuthorityService when the ExternalAccountKey is created
        # Corresponds to the JSON property `b64MacKey`
        # NOTE: Values are automatically base64 encoded/decoded in the client library.
        # @return [String]
        attr_accessor :b64_mac_key
      
        # Output only. Key ID. It is generated by the PublicCertificateAuthorityService
        # when the ExternalAccountKey is created
        # Corresponds to the JSON property `keyId`
        # @return [String]
        attr_accessor :key_id
      
        # Output only. Resource name. projects/`project`/locations/`location`/
        # externalAccountKeys/`key_id`
        # Corresponds to the JSON property `name`
        # @return [String]
        attr_accessor :name
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @b64_mac_key = args[:b64_mac_key] if args.key?(:b64_mac_key)
          @key_id = args[:key_id] if args.key?(:key_id)
          @name = args[:name] if args.key?(:name)
        end
      end
    end
  end
end
